package com.botao.cms;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;

/**
 * @author 曹波涛
 */
@Slf4j
@EnableAsync//开启异步任务
@EnableScheduling//开启定时任务
@EnableTransactionManagement//开启基于注解的事务
@SpringBootApplication
@MapperScan("com.botao.cms.dao")//扫描
public class CMSApplication {
    @Bean
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }


    public static void main(String[] args) {
        SpringApplication.run(CMSApplication.class, args);
    }
}
